package org.gp.demo.file.resource;

import java.io.InputStream;
import java.util.Enumeration;
import java.util.ResourceBundle;
import java.util.Scanner;

public class ResourceOpter {
	public static void main(String[] args) {
		// ResourceBundle rb = ResourceBundle
		// .getBundle("org.gp.demo.file.resource.resource");
		//
		// for (Enumeration<String> e = rb.getKeys(); e.hasMoreElements();) {
		// String key = e.nextElement();
		// System.out.println("Key:" + key + "  Value:" + rb.getString(key));
		// }
		ResourceOpter ro = new ResourceOpter();
		ro.readFile();
	}

	public void readFile() {
		InputStream inStream = this.getClass().getResourceAsStream(
				"resource_txt.txt");
		Scanner sc = new Scanner(inStream);
		while (sc.hasNext()) {
			System.out.println(sc.next());
		}
	}
}
